#[tauri::command]
pub fn login_api(account: String, password: String) -> String {
    if account == "huan" && password == "123456" {
        "login_success".to_string()
    } else {
        "login_fail".to_string()
    }
}

#[tauri::command]
pub fn register_api(username: String, email: String, password: String) -> String {
    if username.len() > 3 && email.contains('@') && password.len() > 6 {
        "register_success".to_string()
    } else {
        "register_fail".to_string()
    }
}

